import {
  ViewProps,
  HostComponent,
  requireNativeComponent, // Fabric
} from "react-native";
import type { DirectEventHandler, Int32 } from "react-native/Libraries/Types/CodegenTypes";
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";

export type OnTransitionClickEventData = Readonly<{
  isTransitionClick: boolean;
  type: string;
}>;

export type transitionData = Readonly<{
  transitionType: string;
  duration: Int32;
}>;

export interface TransitionViewProps extends ViewProps {
  transitionText: string;
  onTransitionClick?: DirectEventHandler<OnTransitionClickEventData>;
  transition?: transitionData;
}

export default codegenNativeComponent<TransitionViewProps>("CustomTransitionView") as HostComponent<TransitionViewProps>;
